package com.twu.biblioteca;

public class MenuReserveBooks implements MenuOption {

    private Library library;
    private InputReader reader;
    private User user;

    public MenuReserveBooks(Library library, InputReader reader, User user) {
        this.library = library;
        this.reader = reader;
        this.user = user;
    }

    @Override
    public void run() {
        if (user.isLogin()) {
            System.out.println("Please enter the book title: ");
            library.reserveBook(reader.getUserInput());
        } else
            System.out.println("Invalid selection. You are not logged in.");
    }

}
